<extend name="Public/base" />

<block name="body">
    <!-- 标题栏 -->
    <div class="main-title">
        <h2>{$username['nickname']}</h2>
    </div>
    <div class="main-title">
        <span>下级总共</span><span style = "color:red">{$data_count}</span><span>人</span>
    </div>
    <div class="cf">
        <!-- <div class="fl">
             <a class="btn" href="#">新 增</a>
             &lt;!&ndash;            <button class="btn ajax-post" url="{:U('FuturesType/changeStatus',array('method'=>'resumeUser'))}" target-form="ids">启 用</button>
                         <button class="btn ajax-post" url="{:U('FuturesType/changeStatus',array('method'=>'forbidUser'))}" target-form="ids">禁 用</button>&ndash;&gt;
             <button class="btn ajax-post confirm" url="#" target-form="ids">删 除</button>
         </div>-->
        <!-- 高级搜索 -->
        <div class="search-form fr cf">
            <div class="sleft">
                <input type="text" id="lv" name="lv"  class="search-input" value="{$lv}" placeholder="选择下级层次">
            </div>
            <div class="sleft">
                <a class="sch-btn" href="javascript:;" id="search" url="{:U('level')}"><i class="btn-search"></i></a>
            </div>
        </div>

    </div>
    <!-- 数据列表 -->
    <div class="data-table table-striped">
        <table class="">
            <thead>
            <tr>
                <!--<th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>-->
                <th class="">用户等级</th>
                <th class="">上级</th>
                <th class="">昵称</th>
                <th class="">用户余额</th>
                <th class="">电话</th>
                <th class="">已分配佣金</th>
                <th class="">未分配佣金</th>
            </tr>
            </thead>
            <tbody>

            <notempty name="arr">
                 <volist name="arr" key="k" id="so">
                     <tr>
                       <td><if condition="$lv eq 0">{$so.level}<else/>{$lv}</if></td>
                       <td>{$so.topname}</td>
                       <td>{$so.nickname}</td>
                       <td>{$so.money}  元</td>
                       <td>{$so.mobile}</td>
                       <td><if condition="$so.yi eq 0">0<else/>{$so.yi}</if></td>
                       <td><if condition="$so.wei eq 0">0<else/>{$so.wei}</if></td>
                     </tr>
                 </volist>
                <else/>
                <td colspan="9" class="text-center"> aOh! 暂时还没有内容! </td>
            </notempty>
            </tbody>
        </table>
    </div>
    <div class="page">
        {$show}
    </div>
</block>

<block name="script">
    <link href="__STATIC__/datetimepicker/css/datetimepicker.css?v={:SITE_VERSION}" rel="stylesheet" type="text/css">
    <php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css?v={:SITE_VERSION}" rel="stylesheet" type="text/css">';</php>
    <link href="__STATIC__/datetimepicker/css/dropdown.css?v={:SITE_VERSION}" rel="stylesheet" type="text/css">
    <script src="__STATIC__/thinkbox/jquery.thinkbox.js?v={:SITE_VERSION}"></script>
    <script type="text/javascript">
        //搜索功能
        $("#search").click(function(){
            var lv=$("#lv").val();
            window.location.href ="{:U('FuturesUser/level',array('id'=>$id))}&lv="+lv;
        });
        //回车搜索
        $(".search-input").keyup(function(e){
            if(e.keyCode === 13){
                $("#search").click();
                return false;
            }
        });
        //导航高亮
        $('.side-sub-menu').find('a[href="{:U(\'index\')}"]').closest('li').addClass('current');
    </script>
</block>
